package com.yawn.zdweb.user;

import com.yawn.zdweb.entity.Group;
import com.yawn.zdweb.entity.User;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "zd-defect", fallback = AuthServiceImpl.class)
public interface AuthService {

    @PostMapping("/user/check/pwd")
    boolean checkPwd(@RequestParam("userId") String userId, @RequestParam("pwd") String pwd);

    @GetMapping("/user/get")
    User get(@RequestParam("userId") String userId);

    @GetMapping("/group/member")
    List<Group> member(@RequestParam("userId") String userId);
}
